package vn.hunghd.flutterdownloader;

public class DownloadTask {
    int primaryId;
    String taskId;
    int status;
    int progress;
    String url;
    String filename;

    long userId;
    long productId;
    long courseId;
    long knowledgeId;
    int fileType;


    String savedDir;
    String headers;
    String mimeType;
    boolean resumable;
    boolean showNotification;
    boolean openFileFromNotification;
    long timeCreated;
    boolean saveInPublicStorage;

    DownloadTask(int primaryId, String taskId, int status, int progress, String url, String filename,
                 long userId,long productId,long courseId,long knowledgeId,int fileType, String savedDir,
                 String headers, String mimeType, boolean resumable, boolean showNotification, boolean openFileFromNotification, long timeCreated, boolean saveInPublicStorage) {
        this.primaryId = primaryId;
        this.taskId = taskId;
        this.status = status;
        this.progress = progress;
        this.url = url;
        this.filename = filename;

        this.userId = userId;
        this.productId = productId;
        this.courseId = courseId;
        this.knowledgeId = knowledgeId;
        this.fileType = fileType;

        this.savedDir = savedDir;
        this.headers = headers;
        this.mimeType = mimeType;
        this.resumable = resumable;
        this.showNotification = showNotification;
        this.openFileFromNotification = openFileFromNotification;
        this.timeCreated = timeCreated;
        this.saveInPublicStorage = saveInPublicStorage;
    }

    @Override
    public String toString() {
        return "DownloadTask{taskId=" + taskId + ",status=" + status + ",progress=" + progress + ",url=" + url +
                ",filename=" + filename + "," +
                ",userId=" + userId + "," +
                ",productId=" + productId + "," +
                ",courseId=" + courseId + "," +
                ",knowledgeId=" + knowledgeId + "," +
                ",fileType=" + fileType + "," +
                "savedDir=" + savedDir + ",headers=" + headers + "}";
    }
}
